const config = {
    "debug": false,
    "search": true,
    "searchKeyWords": "李宗盛",
    "onlyGrabTickets": true,
    "logfile": "fish_log.txt",
    "logMaxLines": 10000,
    "grabWait": 0,
}

module.exports = {
    isDebug: () => {
        return !!config.debug;
    },
    search: () => {
        return config.search;
    },
    searchKeyWords: () => {
        return config.searchKeyWords;
    },
    onlyGrabTickets: () => {
        return !!config.onlyGrabTickets;
    },
    logfile: () => {
        return config.logfile;
    },
    logMaxLines: () => {
        return config.logMaxLines;
    },
    getConfig: () => {
        return JSON.parse(JSON.stringify(config));
    },
    /**
     * 抢票等待时间
     * @return {number}
     */
    grabWait: () => {
        return config.grabWait;
    },
}